home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: ERA.COM!era!spencer
- From: spencer@ERA.COM (Spencer Allain)
- Subject: Re: type checking in C++ was Re: Hungarian notation
- In-Reply-To: Peter Juhl's message of 11 Jan 1996 07: 22:02 GMT
- Message-ID: <SPENCER.96Jan11103334@zorgon.ERA.COM>
- Sender: news@ERA.COM
- Organization: Engineering Research Associates, Vienna, VA
- References: <4cf8hf$8fe@hopi.gate.net> <DKoBrn.CHs@falcon.daytonoh.attgis.com>
- <4d1j37$ge8@stc06.ctd.ornl.gov> <4d2dqq$4lq@news.uni-c.dk>
- Date: Thu, 11 Jan 1996 15:33:34 GMT
-
- In article <4d2dqq$4lq@news.uni-c.dk> Peter Juhl <etiaseti@inet.uni-c.dk> writes:
-
- mbk@jt3ws1.etd.ornl.gov (Kennel) wrote:
- >
- >At one point something like this could be a problem. It it still?
- >
- >function(Type *p) {
- >
- >// One of this may silently crash or do bad things. Both typecheck.
- >
- >// delete p;
- >// delete [] p;
- >
- >}
- >
-
- This has not been a problem for years, delete p , is the way
- things work.
-
- --- peter
-
- Peter Juhl etiaseti@inet.uni-c.dk
-
-
- <* SARCASM ON *>
-
- Great!!!! I'm so pleased that this hasn't been a problem for years.
- To think that I was worried about trivial things like:
-
- Type* type_ptr = new Type[10] ;
-
- function(type_ptr) ;
-
- where function is:
-
- function(Type* p)
- {
- delete p ;
- }
-
- <* SARCASM OFF *>
-
-
- -Spencer
-
- ----------------------------------------------------------------------
- Spencer Allain E-mail: spencer@era.com
- Engineering Research Associates Phone : (703) 734-8800 x1414
- 1595 Spring Hill Road Fax : (703) 827-9411
- Vienna, VA 22182-2235
-
- Modula-3 FAQ http://www.vlsi.polymtl.ca/m3/
- <A HREF=http://www.vlsi.polymtl.ca/m3/>Modula-3 FAQ, etc. </A>
- ----------------------------------------------------------------------
-